<template>
  <div class="warning-info">
    <div class="title">
      {{ title }}
    </div>
    <div v-for="(wrap, wrapIndex) in datas" :key="wrapIndex" class="wrap-1" @click="$emit('change')">
      <div class="tag" :class="['','primary', 'warn', 'empty'][wrap.is_type]">
        {{ ["","已处理", "未处理", "暂无"][wrap.is_type] }}
      </div>
      <div class="info">
        {{ wrap.name }}
      </div>
      <div class="date">
        {{ wrap.sj }}
      </div>
    </div>
  </div>
</template>

<script setup>
// eslint-disable-next-line no-undef
defineProps({
  title: {
    type: String,
    default: "",
  },
  datas: {
    type: Array,
    default: () => [],
  },
});

defineEmits(['change'])
</script>

<style lang="less" scoped>
@import "./index.less";
</style>
